Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add processor to workspace state #730

Merged
merged 1 commit into from
Nov 14, 2024
Merged

Add processor to workspace state #730

merged 1 commit into from
Nov 14, 2024

Conversation

wagoodman
Copy link
Contributor

@wagoodman wagoodman commented Nov 14, 2024

This adds vunnel version information to workspace output, so we know which version of vunnel did the processing of the upstream data. This is related to grype DB v6 work so that we have more detail on a provider-level on how the data was handled upstream.

@wagoodman wagoodman added the enhancement New feature or request label Nov 14, 2024
@@ -1,6 +1,6 @@
# the default is to run these on commit + push
default_stages:
- push
- pre-push
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was getting strong deprecation warnings from the pre-commit tooling on this (and there was an auto migration command, which was rather nice of them to have)

Comment on lines +51 to +54
"processor": {
"type": "string",
"description": "the application that created the workspace, formatted as 'name@version'"
},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what was added relative to the last schema

Comment on lines +52 to +61
try:
from importlib import metadata
except ImportError:
# Python < 3.8
import importlib_metadata as metadata

try:
if not metadata:
raise metadata.PackageNotFoundError
version = metadata.version(package_name)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is how you can reflect package version information rather than use hard coded strings

@wagoodman wagoodman requested a review from a team November 14, 2024 15:14
@wagoodman wagoodman self-assigned this Nov 14, 2024
@wagoodman wagoodman merged commit 7d43319 into main Nov 14, 2024
13 checks passed
@wagoodman wagoodman deleted the add-processor branch November 14, 2024 15:45
@wagoodman wagoodman added this to the DB v6 milestone Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants